/********************************************
 * 功能说明: 
 * 模块名称: 
 * 系统名称: 
 * 软件版权: Frank
 * 系统版本: 1.0.0
 * 开发人员: Frank
 * 开发时间: 2019/9/19 15:42
 * 审核人员: 
 * 相关文档: 
 * 修改记录: 修改日期 修改人员 修改说明
 *********************************************/
package com.spring.arch.job.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 任务登记表
 * @author Frank
 * @version 1.0.0.1
 * @since JDK 1.8
 */
@NoArgsConstructor
@Getter
@Setter
@Entity
@Table(name = "xxl_job_registry")
public class JobRegistry implements Serializable {

    private static final long serialVersionUID = 5400529661809499153L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false, unique = true, insertable = false, updatable = false)
    private Integer id;

    /**
     * 注册组名
     */
    @NotBlank
    @Size(max = 255)
    @Column(name = "registry_group", nullable = false)
    private String registryGroup;

    /**
     * 注册键
     */
    @NotBlank
    @Size(max = 255)
    @Column(name = "registry_key", nullable = false)
    private String registryKey;

    /**
     * 注册值
     */
    @NotBlank
    @Size(max = 255)
    @Column(name = "registry_value", nullable = false)
    private String registryValue;

    /**
     * 更新时间
     */
    @Column(name = "update_time", columnDefinition = "timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP")
    private LocalDateTime updateTime;
}
